//*****************************************************************************
// file        : ad2428_pal.h
// ad2428 pal implementations.
// Copyright (c) 2012-2024 Dynaudio Technology co. Ltd. All rights reserved
//
// Change Logs:
// Date                 Author      Note
// 2024/03/01           Cheney      First draft version
//
//*****************************************************************************
#ifndef __AD2428_PAL_H__
#define __AD2428_PAL_H__

//*****************************************************************************
//
//! \addtogroup ad2428
//! @{
//
//*****************************************************************************
#include "stdint.h"

//*****************************************************************************
//
// If building with a C++ compiler, make all of the definitions in this header
// have a C binding.
//
//*****************************************************************************
#ifdef __cplusplus
extern "C"
{
#endif

//*****************************************************************************
//
// Prototypes for the APIs.
//
//*****************************************************************************
int ad2428_i2c_init(void);
int ad2428_i2c_deinit(void);

int ad2428_i2c_write(uint16_t address, uint16_t nWrite, uint8_t *wbuf);
int ad2428_i2c_write_read(uint16_t address, uint16_t nWrite, uint8_t *wbuf, uint16_t nRead, uint8_t *rbuf);
void ad2428_delay(uint32_t nTime);

//*****************************************************************************
//
// Mark the end of the C bindings section for C++ compilers.
//
//*****************************************************************************

#ifdef __cplusplus
}
#endif

//*****************************************************************************
//
// Close the Doxygen group.
//! @}
//
//*****************************************************************************
#endif //  __AD2428_PAL_H__